package com.ruoyi.cms.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 政策对象 cms_policy_content
 * 
 * @author hct
 * @date 2022-01-22
 */
@Data
public class CmsPolicyContent extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 内容 */
    @Excel(name = "内容")
    private String content;

    /** 头图 */
    @Excel(name = "头图")
    private String img;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Integer status;

    /** 标题 */
    @Excel(name = "标题")
    private String title;

    /** 栏目id */
    @Excel(name = "栏目id")
    private Long typeId;


    private CmsPolicyType policyType;

    /** 是否热点 */
    @Excel(name = "是否热点")
    private Long hot;

    /** 是否上架 */
    @Excel(name = "是否上架")
    private Integer isMarketable;

    /** 上架时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "上架时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date marketableTime;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("content", getContent())
            .append("createTime", getCreateTime())
            .append("img", getImg())
            .append("status", getStatus())
            .append("title", getTitle())
            .append("updateTime", getUpdateTime())
            .append("createBy", getCreateBy())
            .append("typeId", getTypeId())
            .append("updateBy", getUpdateBy())
            .append("hot", getHot())
            .append("isMarketable", getIsMarketable())
            .append("marketableTime", getMarketableTime())
            .toString();
    }
}
